package com.turing.post.tuxedo.util;

import java.io.Serializable;
import java.math.BigInteger;

import org.jdom2.Element;

import com.turing.post.util.PCPSApplicationException;

/**
 * 会员卡对象
 * 
 * @author yxb
 * 
 */
@SuppressWarnings("serial")
public class MemberShipObj implements Serializable {
	/**
	 * 会员卡
	 */
	public CardObj cardObj = new CardObj();

	/**
	 * 会员卡支付密码
	 */
	public String passwd = "";

	/**
	 * 会员卡支付额
	 */
	public BigInteger scorePaidAmount = BigInteger.ZERO;

	/**
	 * 解析会员卡卡对象
	 * 
	 * @param node
	 * @throws Exception
	 */
	public void parseMemberShipObj(Element node)
			throws PCPSApplicationException {
		// 会员卡
		cardObj.parseCardObj(node, true);
		// 会员卡支付密码
		passwd = TransXmlHelper.getOptionalString(node,
				TransXmlHelper.XML_NODE_Passwd);
		// 会员卡支付额
		scorePaidAmount = TransXmlHelper.getInteger(node,
				TransXmlHelper.XML_NODE_ScorePaidAmount);
	}
}
